// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/utils/request'

export function getPidList(params) {
  //此处直接使用参数
  return request({
    url: '/supervision/selectType',
    method: 'GET',
    params
  })
}

/**
 * 新增
 * @param
 */
export function doAdd(pram) {
 // data.rules = pram.rules.join(',')
  return request({
    url: '/supervision/insertAndUpdateReport',
    method: 'POST',
    data: pram
  })
}

/**
 * 删除
 * @param
 */
export function doDel(pram) {
  const data = {
    id: pram.id
  }
  return request({
    url: '/supervision/deleteReport',
    method: 'GET',
    params: data
  })
}

/**
 * 分页列表
 * @param
 */
export function getList(pram) {
  const data = {
    page: pram.page,
    limit: pram.limit,
    report: pram.report,
    pid: pram.pid,
  }
  return request({
    url: '/supervision/getList',
    method: 'get',
    params: data
  })
}


/**
 * 修改状态
 * @param pram
 */
export function updateStatus(pram) {
  return request({
    url: '/supervision/insertAndUpdateProgress',
    method: 'POST',
    data: pram
  })
}

